package com.neuedu.javase.api;

/**
 * @auth 金山老师
 * title:   书籍代码
 * creatime: 2022-09-28 11:02
 * 描述 : 人员信息
 */
public class Student {

    public String name;  //引用类型 null
    public int age;  //所有的基础类型又有默认值   整形 0  浮点型默认 0.0  布尔类型 false char 空字符

    public Student() {
    }

    public Student(String name, int age) {
        this.name = name;
        this.age = age;

    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public static void main(String[] args) {
        Student stu = new Student();
        System.out.println("stu = " + stu);


        Student stu1 = new Student("张三",0);
        System.out.println("stu1 = " + stu1);

    }

}
